import {requests} from "@/api/request";
/**
 * 删除MapData,如polygon,polyline,marker
 * @returns {*}
 */
export const reqDeleteMapData = (id)=>requests({
    url:'/mapdata',
    data:id,
    method:'delete',
})
/**
 * GPS坐标转换转换为GCJ02
 * @param rings
 * @returns {AxiosPromise}
 */
export const reqConvertGps84ToGcj02 = (rings)=>requests({
    url:'/mapdata/convert/gps84togcj02',
    data:rings,
    method:'post',
})
/**
 * GCJ02坐标转换转换为GPS
 * @param rings
 * @returns {AxiosPromise}
 */
export const reqConvertGcj02ToGps84 = (rings)=>requests({
    url:'/mapdata/convert/gps84togcj02',
    data:rings,
    method:'post',
})
/**
 * 查询用户的总共MapData对象数量
 * @returns {AxiosPromise}
 */
export const reqGetMapdataCount = ()=>requests({
    url:"mapdata/findAll",
    method:"GET",
})
/**
 * 分页查询MapData对象
 * @param currentPage 第currentPage页
 * @param pageSize 每页对象数量
 * @returns {AxiosPromise}
 */

export const reqGetMapdataByPage =(currentPage,pageSize)=>requests({
    url:`mapdata/getMapDataByPage?currentPage=${currentPage}&pageSize=${pageSize}`,
    method:"GET",
})
/**
 * 获取置顶的数据
 * @returns {AxiosPromise}
 */
export const reqGetMapDataTop = ()=>requests({
    url:'/mapdata/getMapDataTop',
    method:'get',
})